package com.ztesoft.web.filecommon.customdb.dao.mapper;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ztesoft.web.filecommon.db.po.DmFDetailPO;
import com.ztesoft.web.filecommon.db.po.DmFPO;

public interface IDmFCustomMapper {
    
	List<DmFPO> selectByInfoId(@Param("dmInfoId")Integer dmInfoId,@Param("dmStrategyId")Integer dmStrategyId);

	List<DmFDetailPO> selectByTrackId(@Param("trackId")Integer trackId,@Param("dmStrategyId") Integer dmStrategyId,
			@Param("limit") Integer limit,@Param("state") String state);

	int updateDetailState(@Param("dmStrategyId")Integer dmStrategyId, @Param("updateConditions")String updateConditions, @Param("state")String state);


	int updateFieSizeAndCountForDMF(@Param("dmStrategyId")Integer dmStrategyId,@Param("sumSize")BigDecimal sumSize, 
			@Param("sunNum")int sunNum, @Param("packageName")String packageName, @Param("trackId")Integer trackId);

	int updateFieSizeAndCountForStage(@Param("sumSize")BigDecimal sumSize, @Param("sunNum")int sunNum,@Param("dmInfoId") Integer dmInfoId);

	int updatedmfStateByTrackId(@Param("strategyId")Integer strategyId, @Param("trackId")int trackId,
			@Param("backUpState")String backUpState);

	int updatedmfStateByTaskId(@Param("strategyId")Integer strategyId, @Param("dmTaskId")Integer dmTaskId,
			@Param("backUpState")String backUpState);

	int updateDetailStateByTask(@Param("strategyId")Integer strategyId, @Param("dmTaskId")Integer dmTaskId,
			@Param("backUpState")String backUpState);

	int updateDetailStateByTrackId(@Param("strategyId")Integer strategyId, @Param("trackId")Integer trackId,
			@Param("backUpState")String backUpState);

	int updatedmfStateByInfoId(@Param("strategyId")Integer strategyId, @Param("dmInfoId")Integer dmInfoId,
			@Param("state")String state);

	int updateDetailStateByInfoId(@Param("strategyId")Integer strategyId, @Param("dmInfoId")Integer dmInfoId,
			@Param("state")String state);

	int updatedmfByTrackId(@Param("strategyId")Integer strategyId, @Param("trackId")Integer trackId, 
			@Param("state")String state);

}